\(\int \csc ^4(c+d x) (a+b \sin ^2(c+d x)) \, dx\) [72]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 21, antiderivative size = 43 \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {(2 a+3 b) \cot (c+d x)}{3 d}-\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d} \]

[Out]

-1/3*(2*a+3*b)*cot(d*x+c)/d-1/3*a*cot(d*x+c)*csc(d*x+c)^2/d

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3091, 3852, 8} \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {(2 a+3 b) \cot (c+d x)}{3 d}-\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d} \]

[In]

Int[Csc[c + d*x]^4*(a + b*Sin[c + d*x]^2),x]

[Out]

-1/3*((2*a + 3*b)*Cot[c + d*x])/d - (a*Cot[c + d*x]*Csc[c + d*x]^2)/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 3091

Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[A*Cos[e +
 f*x]*((b*Sin[e + f*x])^(m + 1)/(b*f*(m + 1))), x] + Dist[(A*(m + 2) + C*(m + 1))/(b^2*(m + 1)), Int[(b*Sin[e
+ f*x])^(m + 2), x], x] /; FreeQ[{b, e, f, A, C}, x] && LtQ[m, -1]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d}+\frac {1}{3} (2 a+3 b) \int \csc ^2(c+d x) \, dx \\ & = -\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d}-\frac {(2 a+3 b) \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{3 d} \\ & = -\frac {(2 a+3 b) \cot (c+d x)}{3 d}-\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.14 \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {2 a \cot (c+d x)}{3 d}-\frac {b \cot (c+d x)}{d}-\frac {a \cot (c+d x) \csc ^2(c+d x)}{3 d} \]

[In]

Integrate[Csc[c + d*x]^4*(a + b*Sin[c + d*x]^2),x]

[Out]

(-2*a*Cot[c + d*x])/(3*d) - (b*Cot[c + d*x])/d - (a*Cot[c + d*x]*Csc[c + d*x]^2)/(3*d)

Maple [A] (verified)

Time = 1.09 (sec) , antiderivative size = 35, normalized size of antiderivative = 0.81

method result size
derivativedivides \(\frac {a \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{3}\right ) \cot \left (d x +c \right )-b \cot \left (d x +c \right )}{d}\) \(35\)
default \(\frac {a \left (-\frac {2}{3}-\frac {\left (\csc ^{2}\left (d x +c \right )\right )}{3}\right ) \cot \left (d x +c \right )-b \cot \left (d x +c \right )}{d}\) \(35\)
risch \(-\frac {2 i \left (3 b \,{\mathrm e}^{4 i \left (d x +c \right )}-6 a \,{\mathrm e}^{2 i \left (d x +c \right )}-6 b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a +3 b \right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}\) \(63\)
parallelrisch \(-\frac {\left (-\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\cot \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +\cot \left (\frac {d x}{2}+\frac {c}{2}\right ) a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a +9 a +12 b \right )}{24 d}\) \(80\)
norman \(\frac {-\frac {a}{24 d}+\frac {a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {\left (5 a +6 b \right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}+\frac {\left (5 a +6 b \right ) \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d}-\frac {\left (11 a +12 b \right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {\left (11 a +12 b \right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2}}\) \(144\)

[In]

int(csc(d*x+c)^4*(a+b*sin(d*x+c)^2),x,method=_RETURNVERBOSE)

[Out]

1/d*(a*(-2/3-1/3*csc(d*x+c)^2)*cot(d*x+c)-b*cot(d*x+c))

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.26 \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {{\left (2 \, a + 3 \, b\right )} \cos \left (d x + c\right )^{3} - 3 \, {\left (a + b\right )} \cos \left (d x + c\right )}{3 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(csc(d*x+c)^4*(a+b*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

-1/3*((2*a + 3*b)*cos(d*x + c)^3 - 3*(a + b)*cos(d*x + c))/((d*cos(d*x + c)^2 - d)*sin(d*x + c))

Sympy [F]

\[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=\int \left (a + b \sin ^{2}{\left (c + d x \right )}\right ) \csc ^{4}{\left (c + d x \right )}\, dx \]

[In]

integrate(csc(d*x+c)**4*(a+b*sin(d*x+c)**2),x)

[Out]

Integral((a + b*sin(c + d*x)**2)*csc(c + d*x)**4, x)

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.65 \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {3 \, {\left (a + b\right )} \tan \left (d x + c\right )^{2} + a}{3 \, d \tan \left (d x + c\right )^{3}} \]

[In]

integrate(csc(d*x+c)^4*(a+b*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/3*(3*(a + b)*tan(d*x + c)^2 + a)/(d*tan(d*x + c)^3)

Giac [A] (verification not implemented)

none

Time = 0.40 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.86 \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {3 \, a \tan \left (d x + c\right )^{2} + 3 \, b \tan \left (d x + c\right )^{2} + a}{3 \, d \tan \left (d x + c\right )^{3}} \]

[In]

integrate(csc(d*x+c)^4*(a+b*sin(d*x+c)^2),x, algorithm="giac")

[Out]

-1/3*(3*a*tan(d*x + c)^2 + 3*b*tan(d*x + c)^2 + a)/(d*tan(d*x + c)^3)

Mupad [B] (verification not implemented)

Time = 13.87 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.67 \[ \int \csc ^4(c+d x) \left (a+b \sin ^2(c+d x)\right ) \, dx=-\frac {a\,{\mathrm {cot}\left (c+d\,x\right )}^3}{3\,d}-\frac {\mathrm {cot}\left (c+d\,x\right )\,\left (a+b\right )}{d} \]

[In]

int((a + b*sin(c + d*x)^2)/sin(c + d*x)^4,x)

[Out]

- (a*cot(c + d*x)^3)/(3*d) - (cot(c + d*x)*(a + b))/d